<div style="float: left;">
<div class="ui-corner-top side_menu" style="width: 700px;">View Profile</div>
<div style="border:1px  solid #286bcc;">
<div>&nbsp;</div>
	<?if(isset($system_message))echo $system_message;
		echo validation_errors('<div class="error">', '</div>');
	?>
	<div>
		<fieldset>
			<legend>Add Profile</legend>
			<?=form_open('employee_settings/add_profile/' . $username); ?>
				<table class="data-table">
					<tbody class="tabular">
						<?
							foreach($display AS $disp => $disp_val)
							{
								switch($disp_val['type'])
								{
									case 'set':
										$input = "<tr>";
										$input .= "<td><label>" . $disp_val['display'] . ": </label></td>";
										$input .= "<td><select name=profile[" . $disp . "]>";
										$input .= "<option value=''></option>";
										foreach($disp_val['set'] AS $key => $value)
										{
											$input .= "<option value=" . $key . ">" . $value . "</option>";
										}

										$input .= "</select></td>";
										$input .= "</tr>";
										echo $input;
										break;
									case 'date':
										$input = "<tr>";
										$input .= "<td><label>" . $disp_val['display'] . ": </label></td>";
										$input .= "<td><input type='text' name=profile[$disp] id=profile[$disp]  class='pick_date' value='Click to select date.' /></td>";
										$input .= "</tr>";
										echo $input;
										break;
									default:
										$input = "<tr>";
										$input .= "<td><label>" . $disp_val['display'] . ": </label></td>";
										if($disp === 'given_id')
										{
											$input .= "<td><input type='text' name=profile[" . $disp . "] id=profile[" . $disp . "] value='" . $username . "'/></td>";
										}else
										{
											$input .= "<td><input type='text' name=profile[" . $disp . "] id=profile[" . $disp . "] value=''/></td>";
										}
										$input .= "</tr>";
										echo $input;
										break;
								}				
							}
						?>
					</tbody>
				</table>
				<input type="hidden" name="profile[id]" id="profile[id]" value=<?php echo $u_id; ?>>
				<input type="hidden" name="profile[role]" id="profile[role]" value=<?php echo $role; ?>>
				<input type="submit" name="new_profile" value="Add Profile"/>
			<?=form_close(); ?>
		</fieldset>
	</div>
</div>
<div>&nbsp;</div>
</div>